<%@ include file="/WEB-INF/jspf/directive/taglib.jspf"%>
<html>

<c:set var="title">
	<c:out value="Profile" />
</c:set>
<%@ include file="/WEB-INF/jspf/head.jspf"%>

<body>

	<form action="controller" class="fc fs" method="post">
		<input type="hidden" name="command" value="updateProfile">
		<p class="lead heading">Edit your info</p>
		<label>Name</label>
		<input type="text" class="input-block-level" placeholder="Name" value="${user.name}" name="name">
		<label>Phone</label>
		<input type="text" class="input-block-level" placeholder="Phone" value="${user.phone}" name="phone">
		<label>Address info</label>
		<textarea rows="5" maxlength="400" class="input-block-level" name="desc" style="resize:none;">${user.desc}</textarea>
		<label>Choose your city</label>
		<select class="input-block-level" id="city_select" name="city">
			<c:forEach items="${cities}" var="city">
					<option
						<c:if test="${city.id == user.city.id}">selected</c:if>
					>
						<c:out value="${city.name}"></c:out>
					</option>
			</c:forEach>
		</select>
		<button type="submit" class="btn btn-large btn-info btn-block b-mrg" >Update</button>
		<a href="controller?command=menu" class="btn btn-block btn-large b-mrg">Back</a>
	</form>

</body>
</html>